<?php

namespace IDock\Http;

/**
 * 基础配置类
 */
class RequestConfig
{
    protected $gateway = '';

    protected $route = '';

    protected $timeout = 5;

    protected $logsDir = '';

    protected $logsFile = '';

    protected $urlTip = '';

    protected $proxy = '';

    protected $proxyPW = '';

    protected $proxyAccount = '';

    protected $httpDebug = false;

    public function setRoute(string $route): self
    {
        $this->route = $route;
        return $this;
    }

    public function setGateway(string $gateway): self
    {
        $this->gateway = $gateway;
        return $this;
    }

    public function setTimeout(int $timeout): self
    {
        $this->timeout = $timeout;
        return $this;
    }

    public function setHttpDebug(bool $httpDebug): self
    {
        $this->httpDebug = $httpDebug;
        return $this;
    }

    public function setLogsDir(string $logsDir): self
    {
        $this->logsDir = rtrim($logsDir, '/') . '/';
        return $this;
    }

    public function setProxy(string $proxy): self
    {
        $this->proxy = $proxy;
        return $this;
    }

    public function setUrlTip(string $urlTip): void
    {
        $this->urlTip = $urlTip;
    }


}
